#!/usr/bin/perl
use Getopt::Std;
getopt("s:f:n", \%args);
$snp = $args{s};
chomp $snp;
$file = $args{f};
chomp $file;
$newfile = $args{n};
chomp $newfile;
if($snp eq "")
{
        die "entered snpfile name  is empty\n";
}
if($file eq "")
{
        die "entered file name  is empty\n";
}
if($newfile eq "")
{
        die "entered newfile name is empty\n";
}
open(SNPBUFF,$snp);
open(BUFF,$file);
open(WRBUFF,">$newfile");
while($line = <SNPBUFF>)
{
	chomp $line;
	$line =~ s/\n//g;
	$line =~ s/\t//g;
	$line =~ s/\r//g;
	$line =~ s/\s//g;
	$hash1{$line}  =1;
}
while($line = <BUFF>)
{
	chomp $line;
	@array = split(/\s/,$line);
	if($hash1{$array[1]} ==1)
	{
		print $array[1]."\n";
		$line =~ tr/ATGC/TACG/;
	}
	print WRBUFF $line."\n";
}
